package com.csdj.file;

import java.io.File;
import java.io.FileInputStream;

public class Recicle {

    public int recurise(int i){
        System.out.println("输入能数:"+i);
        if(i == 0){
            return 0;
        }
        return i + recurise(i-1);
    }

    public void readFile(File file){
        if(file == null)return;
        if(file.isFile()){
            System.out.println(file.getName());
        }else{
            File[] files = file.listFiles();
            if(files != null && files.length>0){
                for(File f: files){
                    readFile(f);
                }
            }
        }
    }

    public static void main(String[] args) {
        File f = new File("f:/");
        new Recicle().readFile(f);
    }
}
